<?php
class Tool{
	static function _setCookie($name,$value){
		setcookie($name,$value,time()+3600,'/');
	}
	static function _removeCookie($name){
		setcookie($name,'',time()-3600,'/');
	}
	static function _setSession($name,$value){
		if(!isset($_SESSION)){
			session_start();
		}
		$_SESSION[$name] = $value;
	}
	static function _getSession($name){
		if(!isset($_SESSION)){
			session_start();
		}
		return isset($_SESSION[$name])?$_SESSION[$name]:'';
	}
	static function _removeAllSession(){
		if(!isset($_SESSION)){
			session_start();
		}
		session_destroy();
	}
}
?>
